package com.albert.core.controller.admin;


import com.albert.common.result.R;
import com.albert.core.pojo.entity.LendReturn;
import com.albert.core.service.LendReturnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 标的准备表 前端控制器
 * </p>
 *
 * @author Hikari
 * @since 2024-07-21
 */
@RestController
@Api(tags = "还款记录")
@RequestMapping("/admin/core/lendReturn")
@Slf4j
public class AdminLendReturnController {

    @Resource
    private LendReturnService lendReturnService;

    @ApiOperation("还款计划列表")
    @GetMapping("/list{lendId}")
    public R list(@ApiParam(value = "标的id", required = true) @PathVariable Long lendId) {
        List<LendReturn> lendList = lendReturnService.selectByLendId(lendId);
        return R.ok().data("list", lendList);
    }

}

